package com.siteseat.common.rest.exception;

import javax.ws.rs.WebApplicationException;
import javax.ws.rs.core.Response;

/**
 * The WebApplicationException for INTERNAL_SERVER_ERROR
 */
public class InternalServerException extends WebApplicationException {

  /**
   * 
   */
  private static final long serialVersionUID = -4091464407298057135L;

  /**
   * The constructor
   * 
   * @param msg
   *          error message
   */
  public InternalServerException( String msg ) {
    super( Response.status( Response.Status.INTERNAL_SERVER_ERROR ).entity( msg ).build() );
  }

  /**
   * The constructor
   * 
   * @param cause
   *          the cause
   */
  public InternalServerException( Throwable cause ) {
    super( cause, Response.Status.INTERNAL_SERVER_ERROR );
  }

  /**
   * The constructor
   * 
   * @param msg
   *          error message
   * @param cause
   *          the cause
   */
  public InternalServerException( String msg, Throwable cause ) {
    super( cause, Response.status( Response.Status.INTERNAL_SERVER_ERROR ).entity( msg ).build() );
  }

}
